<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<html>
<body>

<table>
    <tr>
        <td>
            <form action="<c:url value=""/>" enctype="multipart/form-data" method="post">
                <table>
                    <tr>
                        <td>
                            <spring:bind path="command.header">
                                <input type="text" name="header" value="<c:out value="${status.value}"/>"/>
                            </spring:bind>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <spring:bind path="command.text">
                                <textarea name="text" cols="30" rows="10"><c:out value="${status.value}"
                                                                                 default=""/></textarea>
                            </spring:bind>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="file" name="photo"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <input type="submit" name="submit" value="Submit data"/>
                        </td>
                    </tr>
                </table>
            </form>
        </td>
        <td>
            Manage photos:<br>
            <c:forEach items="${command.pictures}" var="photo">
                <a href="<c:url value="/editpicture.form/${photo.id}"/>"><img src="<c:url value="/images/${photo.thumbnailPath}"/>"/></a><br/>
                <a href="<c:url value="/deletepicture.form/${photo.id}"/>">del it</a><br/>
            </c:forEach>
        </td>
    </tr>
</table>


</body>
</html>
